<template>
<div class="newsbox">
    <div class="content">
        <h3>新闻标题</h3>
        <p>Lorem ipsum dolor, sit amet consectetur adipisicing elit. 
            Earum hic cupiditate labore voluptatem doloremque illo enim 
            ipsam nobis autem repellendus dignissimos minima et ea, voluptatum incidunt eum 
            recusandae iusto? Repellat similique doloremque blanditiis ut aliquid nihil amet, 
            labore quas porro tenetur aspernatur iste dicta minus hic, commodi accusamus, corrupti animi?</p>
    </div>
</div>
</template>
<script>

export default {
    data(){
        return{
            
        }
    }
}
</script>
<style scoped lang="less">
.content{
    width: 400px;
    height: 200px;
    p{
        // 有固定宽度
        color:#3c3c4a;
        overflow:hidden;//隐藏超出部分
        word-wrap:break-word;//设置不换行
        text-overflow:ellipsis;//添加省略号
        display:-webkit-box;//设置p为弹性伸缩盒子模型
        -webkit-line-clamp: 3;//指定行数 要设置display才生效
        -webkit-box-orient: vertical;//水平还是垂直布局
    }
}
</style>